const { DataTypes } = require('sequelize');
const defineModel = require('@/config/database');
const Model = defineModel('xs_role', {
	name: {
		type: DataTypes.STRING(64),
		comment: '角色名称',
		unique: true
	},
	type: {
		type: DataTypes.INTEGER(2),
		comment: '角色类型'
	},
	content: {
		type: DataTypes.TEXT('tiny'),
		allowNull: true,
		comment: '角色描述'
	},
	createtime: {
		type: DataTypes.DATE,
		comment: '创建时间'
	},
	updatetime: {
		type: DataTypes.DATE,
		comment: '更新时间'
	}
});
Model.beforeCreate((model, options) => {
	// console.log(model, options);
});
module.exports = Model;